#pragma once
#include "Condition.h"
#include <windows.h>
#include <winbase.h>
#include <stdio.h>
#include <stdlib.h>

enum CFG_TYPE {TYPICAL, BLOCK, RANDOM};

class Life
{
	public:	
	CFG_TYPE		type;

	bool**			life;
	unsigned int	width;
	unsigned int	height;

	unsigned int	radius;
	Condition*		live;
	Condition*		birth;

	double			birthChance;
	double			deathChance;	
	bool			Load (char* fileName);

	Life (char* fileName, unsigned int width , unsigned int height);
	CFG_TYPE		GetType ();
	unsigned int	GetRadius ();
	double			GetBirthChance ();
	double			GetDeathChance ();

	void			Step();
	unsigned int	GetCountOfNeighbores(int i, int j);
};